<%@ Import Namespace="System.Collections.ObjectModel" %>
<%@ Import Namespace="Hallenberg.SmartClient.Menu" %>
<%@ Import Namespace="Hallenberg.SmartClient" %>

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<List<DemoData.Model.Product>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%=Html.Encode(ViewData["BrowserTitle"]) %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2><%=Html.Encode(ViewData["Header"]) %></h2>
    
    <% foreach (Hallenberg.SmartClient.Menu.BaseMenuItem menu in (ReadOnlyCollection<BaseMenuItem>) this.ViewData[Hallenberg.SmartClient.MVC.ControllerFactoryEx.DependentMenuItems])
    { %>
        <li><%=Html.ActionLink(menu.MenuItemTitle, menu.AttachedToMethod, menu.AttachedToClass) %></li>
    <% } %>
    
    <br />
    
    <table>
        <tr>
            <td><%=Html.Encode(ViewData["ProductName"]) %></td>
            <td><%=Html.Encode(ViewData["ProductPrice"]) %></td>
        </tr>
    <%
        foreach (DemoData.Model.Product product in this.Model)
        { %>
        
        <tr>
            <td><%= product.ProductName %></td>
            <td><%= product.Price %></td>
        </tr>
        
     <% }
    %>
    
    </table>

</asp:Content>
